﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="query.aspx.cs" Inherits="AnyOffice.general.hrms.manage.query" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title></title>
    <link href="/module/date_selector/popcalendar.css" type="text/css" rel="stylesheet">
    <script src="/module/date_selector/popcalendar.js"></script>
    <script src="/aspnet_client/core/function.js"></script>
    <script>
        function CheckForm() {

            if (!checkIsInteger(document.Form1.txtMinAge.value)) {
                alert("年龄最小值输入不正确！");
                document.Form1.txtMinAge.focus();
                return (false);
            }

            if (!checkIsInteger(document.Form1.txtMaxAge.value)) {
                alert("年龄最大值输入不正确！");
                document.Form1.txtMaxAge.focus();
                return (false);
            }

            if (!checkIsDate(document.Form1.txtWorkDateBegin.value)) {
                alert("参加工作开始时间不正确！");
                document.Form1.txtWorkDateBegin.focus();
                return (false);
            }
            if (!checkIsDate(document.Form1.txtWorkDateEnd.value)) {
                alert("参加工作结束时间不正确！");
                document.Form1.txtWorkDateEnd.focus();
                return (false);
            }

            if (!checkIsDate(document.Form1.txtJoinDateBegin.value)) {
                alert("加入本单位时间开始时间不正确！");
                document.Form1.txtJoinDateBegin.focus();
                return (false);
            }
            if (!checkIsDate(document.Form1.txtJoinDateEnd.value)) {
                alert("加入本单位时间结束时间不正确！");
                document.Form1.txtJoinDateEnd.focus();
                return (false);
            }


            return true;
        }
    </script>
    <script>
        function delete_user(hrms_id, dept_id) {
            msg = '确认要删除该学生档案么？';
            if (window.confirm(msg)) {
                URL = "delete.aspx?hrms_id=" + hrms_id + "&dept_id=" + dept_id;
                window.location = URL;
            }
        }

        function open_hrms(hrms_id) {
            URL = "../detail.aspx?hrms_id=" + hrms_id;
            myleft = (screen.availWidth - 500) / 2;
            mytop = 150
            mywidth = 600;
            myheight = 500;
            window.open(URL, "read_hrms", "height=" + myheight + ",width=" + mywidth + ",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=" + mytop + ",left=" + myleft + ",resizable=yes");
        }
    </script>
</head>
<body class="bodycolor" topmargin="5">
    <form id="Form1" method="post" runat="server">
    <iframe id="download_excel" name="download_excel" src="" width="0" height="0" frameborder="0">
    </iframe>
    <table class="small" cellspacing="0" cellpadding="3" width="100%" border="0">
        <tr>
            <td class="Big">
                <img src="/images/menu/hrms.gif" align="absmiddle"><span class="big3">
                    <asp:Literal ID="litNavTitle" runat="server" Text="查询学生档案"></asp:Literal></span>
            </td>
        </tr>
    </table>
    <asp:Panel ID="pnlMain" runat="server">
        <table class="small" cellspacing="1" cellpadding="2" width="95%" align="center" border="0"
            bgcolor="#000000">
            <tr>
                <td class="TableHeader" nowrap colspan="4">
                    <img src="/images/green_arrow.gif" align="absmiddle">
                    &nbsp;请指定查询条件
                </td>
            </tr>
            <tr>
                <td nowrap class="TableControl">
                    所属：
                </td>
                <td class="TableData">
                    <asp:DropDownList ID="ddlDeptId" runat="server" CssClass="BigSelect">
                    </asp:DropDownList>
                </td>
                <td class="TableControl">
                    编号：
                </td>
                <td class="TableData">
                    <input class="BigInput" id="txtNumber" type="text" maxlength="50" size="15" name="txtNumber"
                        runat="server">
                </td>
            </tr>
            <tr>
                <td class="TableControl" nowrap>
                    性别：
                </td>
                <td class="TableData">
                    <select class="BigSelect" id="selectSex" name="selectSex" runat="server">
                        <option value="" selected></option>
                        <option value="True">男</option>
                        <option value="False">女</option>
                    </select>
                </td>
                <td class="TableControl">
                    年龄：
                </td>
                <td class="TableData">
                    <input class="BigInput" id="txtMinAge" type="text" maxlength="2" size="4" name="txtMinAge"
                        runat="server">
                    &nbsp;至
                    <input class="BigInput" id="txtMaxAge" type="text" maxlength="2" size="4" name="txtMaxAge"
                        runat="server">
                </td>
            </tr>
            <tr>
                <td class="TableControl" nowrap>
                    民族：
                </td>
                <td class="TableData">
                    <input class="BigInput" id="txtNation" type="text" maxlength="50" size="8" name="txtNation"
                        runat="server">
                </td>
                <td class="TableControl">
                    身份证号码：
                </td>
                <td class="TableData">
                    <input class="BigInput" id="txtCardNo" type="text" maxlength="50" size="15" name="txtCardNo"
                        runat="server">
                </td>
            </tr>
            <!--<tr>
                <td class="TableControl" nowrap>
                    婚姻状况：
                </td>
                <td colspan="3" class="TableData">
                    <select class="BigSelect" id="selectMarry" name="selectMarry" runat="server">
                        <option value="" selected></option>
                        <option value="未婚">未婚</option>
                        <option value="已婚">已婚</option>
                        <option value="离异">离异</option>
                    </select>
                </td>
            </tr>-->
            <tr>
                <td class="TableControl" nowrap>
                    籍贯：
                </td>
                <td class="TableData">
                    <input class="BigInput" id="txtNativePlace" type="text" maxlength="50" size="15"
                        name="txtNativePlace" runat="server">
                </td>
                <td class="TableControl">
                    户口所在地：
                </td>
                <td class="TableData">
                    <input class="BigInput" id="txtHukouPlace" type="text" maxlength="50" size="15" name="txtHukouPlace"
                        runat="server">
                </td>
            </tr>
            <!--<tr>
                <td class="TableControl" nowrap>
                    学历：
                </td>
                <td class="TableData">
                    <select class="BigSelect" id="selectEducation" name="selectEducation" runat="server">
                        <option value="" selected></option>
                        <option value="小学">小学</option>
                        <option value="初中">初中</option>
                        <option value="高中">高中</option>
                        <option value="中专">中专</option>
                        <option value="大专">大专</option>
                        <option value="大本">大本</option>
                        <option value="硕士">硕士</option>
                        <option value="博士">博士</option>
                        <option value="博士后">博士后</option>
                    </select>
                </td>
                <td class="TableControl">
                    专业：
                </td>
                <td class="TableData">
                    <input class="BigInput" id="txtSpeciallity" type="text" maxlength="50" size="15"
                        name="txtSpeciallity" runat="server">
                </td>
            </tr>
            <tr>
                <td class="TableControl" nowrap>
                    毕业院校：
                </td>
                <td colspan="3" class="TableData">
                    <input class="BigInput" id="txtSchool" type="text" maxlength="50" size="30" name="txtSchool"
                        runat="server">
                </td>
            </tr>
            <tr>
                <td class="TableControl" nowrap>
                    参加工作时间：
                </td>
                <td colspan="3" nowrap class="TableData">
                    <input class="BigInput" id="txtWorkDateBegin" type="text" maxlength="10" size="10"
                        name="txtWorkDateBegin" runat="server">
                    <img style="cursor: hand" onclick="popUpCalendar(this,txtWorkDateBegin,'yyyy-mm-dd','');"
                        src="/module/date_selector/calendar.gif" align="absMiddle" border="0">&nbsp;至
                    <input class="BigInput" id="txtWorkDateEnd" type="text" maxlength="10" size="10"
                        name="txtWorkDateEnd" runat="server">
                    <img style="cursor: hand" onclick="popUpCalendar(this,txtWorkDateEnd,'yyyy-mm-dd','');"
                        src="/module/date_selector/calendar.gif" align="absMiddle" border="0">
                    格式2006-1-1
                </td>
            </tr>-->
            <tr>
                <td class="TableControl" nowrap>
                    加入本校时间：
                </td>
                <td colspan="3" nowrap class="TableData">
                    <input class="BigInput" id="txtJoinDateBegin" type="text" maxlength="10" size="10"
                        name="txtJoinDateBegin" runat="server">
                    <img style="cursor: hand" onclick="popUpCalendar(this,txtJoinDateBegin,'yyyy-mm-dd','');"
                        src="/module/date_selector/calendar.gif" align="absMiddle" border="0">
                    至
                    <input class="BigInput" id="txtJoinDateEnd" type="text" maxlength="10" size="10"
                        name="txtJoinDateEnd" runat="server">
                    <img style="cursor: hand" onclick="popUpCalendar(this,txtJoinDateEnd,'yyyy-mm-dd','');"
                        src="/module/date_selector/calendar.gif" align="absMiddle" border="0">
                    格式2006-1-1
                </td>
            </tr>
            <!--<tr>
                <td class="TableControl" nowrap>
                    职务：
                </td>
                <td class="TableData">
                    <input class="BigInput" id="txtPost" type="text" maxlength="50" size="15" name="txtPost"
                        runat="server">
                </td>
                <td class="TableControl">
                    职称：
                </td>
                <td class="TableData">
                    <input class="BigInput" id="txtTechPost" type="text" maxlength="50" size="15" name="txtTechPost"
                        runat="server">
                </td>
            </tr>-->
            <tr>
                <td class="TableControl" nowrap>
                    政治面貌：
                </td>
                <td class="TableData">
                    <select class="BigSelect" id="selectPolitics" name="selectPolitics" runat="server">
                        <option value="" selected></option>
                        <option value="群众">群众</option>
                        <option value="团员">团员</option>
                        <option value="预备党员">预备党员</option>
                        <option value="党员">党员</option>
                    </select>
                </td>
                <td class="TableControl">
                    备 注：
                </td>
                <td class="TableData">
                    <span class="TableData">
                        <input class="BigInput" id="txtMemo" type="text" maxlength="50" size="15" name="txtMemo"
                            runat="server">
                    </span>
                </td>
            </tr>
            <tr class="TableControl">
                <td nowrap align="center" colspan="4">
                    <input class="BigButton" onclick="return CheckForm();" type="submit" value="查询">
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnlResult" runat="server" Visible="false">
        <asp:Repeater ID="rptHrms" runat="server">
            <HeaderTemplate>
                <table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3">
                    <tr class="TableHeader">
                        <td nowrap align="center">
                            姓名
                        </td>
                        <td nowrap align="center">
                            性别
                        </td>
                        <td nowrap align="center">
                            出生年月
                        </td>
                        <td nowrap align="center">
                            民族
                        </td>
                        <td nowrap align="center">
                            籍贯
                        </td>
                        <td nowrap align="center">
                            政治面貌
                        </td>
                        <td nowrap align="center">
                            身份证号码
                        </td>
                        <td nowrap align="center">
                            操作
                        </td>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="TableLine1">
                    <td nowrap align="center">
                        <a href="javascript:open_hrms('<%#Eval("HrmsId")%>')">
                            <%#Eval("UserName")%></a>
                    </td>
                    <td nowrap align="center">
                        <%#Convert.ToBoolean(Eval("Sex").ToString()) == true ? "男" : "女"%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval( "Birthday") != DBNull.Value ? Convert.ToDateTime(Eval( "Birthday").ToString()).ToString("d") : ""%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("Nation")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("NativePlace")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("Politics")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("CardNo")%>
                    </td>
                    <td nowrap align="center">
                        <a href="edit.aspx?hrms_id=<%#Eval("HrmsId")%>&dept_id=<%#Eval("DeptId")%>">编辑</a>&nbsp;&nbsp
                        <a href="javascript:delete_user('<%#Eval("HrmsId")%>','<%#Eval("DeptId")%>');">删除</a>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr class="TableLine2">
                    <td nowrap align="center">
                        <a href="javascript:open_hrms('<%#Eval("HrmsId")%>')">
                            <%#Eval("UserName")%></a>
                    </td>
                    <td nowrap align="center">
                        <%#Convert.ToBoolean(Eval("Sex").ToString()) == true ? "男" : "女"%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval( "Birthday") != DBNull.Value ? Convert.ToDateTime(Eval( "Birthday").ToString()).ToString("d") : ""%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("Nation")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("NativePlace")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("Politics")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("CardNo")%>
                    </td>
                    <td nowrap align="center">
                        <a href="edit.aspx?hrms_id=<%#Eval("HrmsId")%>&dept_id=<%#Eval("DeptId")%>">编辑</a>&nbsp;&nbsp
                        <a href="javascript:delete_user('<%#Eval("HrmsId")%>','<%#Eval("DeptId")%>');">删除</a>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <br>
        <center>
            <input class="BigButton" onclick="location='query.aspx'" type="button" value="返回"></center>
        <br>
    </asp:Panel>
    <asp:Literal ID="litMessage" runat="server"></asp:Literal>
    </form>
</body>
</html>
